From 0d415cd39a02ce7152f036bbb297d043767d78b9 Mon Sep 17 00:00:00 2001 From: "maf46@burn.cl.cam.ac.uk" Date: Sat, 19 Feb 2005 19:42:39 +0000 Subject: [PATCH] bitkeeper revision 1.1205.1.10 (421796afi6cb40DRRlGAd0wByIfSjg) Bug fix: stop leaking shadow L2 pages like a sieve. We were looking up shadow_status with a mfn rather than a gpfn. --- xen/include/asm-x86/shadow.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xen/include/asm-x86/shadow.h b/xen/include/asm-x86/shadow.h index 25b0287b7b..d1f88f77d8 100644 --- a/xen/include/asm-x86/shadow.h +++ b/xen/include/asm-x86/shadow.h @@ -730,10 +730,8 @@ static inline void __update_pagetables(struct exec_domain *ed) { struct domain *d = ed->domain; unsigned long gmfn = pagetable_val(ed->arch.guest_table) >> PAGE_SHIFT; - - // mafetter: BUG: __shadow_status() should take a gpfn, not a gmfn... - // WHY DOES THIS WORK? - unsigned long smfn = __shadow_status(d, gmfn) & PSH_pfn_mask; + unsigned long gpfn = __mfn_to_gpfn(d, gmfn); + unsigned long smfn = __shadow_status(d, gpfn) & PSH_pfn_mask; SH_VVLOG("0: __update_pagetables(gmfn=%p, smfn=%p)", gmfn, smfn); -- 2.30.2